'''
Author: lyc
Date: 2020-11-02 19:50:41
LastEditors: lyc
LastEditTime: 2021-01-12 14:43:18
Description: file content
'''
from os import environ
import os

# APP={}

SESSION_CONFIGS = [
    dict(
        name='tee',
        display_name='tee',
        num_demo_participants=18,
        app_sequence=['group_rgb', 'group1', 'group2'],
        # app_sequence=['testgame','group1','instruction_bargaining1','bargaining2'],
    ),
    # startgame 第一个页面
    # testgame/'bargaining_questionnaire'  第一页进入 然后量表1 量表2*2 量表3 wait 滑条游戏 wait
    # 恭喜你，分队3*6 团体游戏——做计算题 wait 再做计算题 wait 结算页面  再再做计算题 wait 结算页面
    # group1/2/3 分队用 这里有一个wait
    # testgame已经把18个人分成了红蓝绿三个6 然后还需要让group分为3人小组
    # group1 3个人是不同群体的
    # group2 3个人是一个群体的
    # group3 2个人是一个群体的 1个人是外群体的

    # 'instruction_bargaining1' 介绍第一个实验 介绍页面1 介绍页面2
    # 'bargaining1' 实验页面 wait 结算页面（这个模块是循环的 直到结束）
    # 'instruction_bargaining2' 介绍第二个实验 介绍页面1 介绍页面2
    # 'bargaining2' 实验页面 wait 结算页面（这个模块是循环的 直到结束）
    # 'instruction_bargaining3' 介绍第三个实验 介绍页面1 介绍页面2
    # 'bargaining3' 实验页面 wait 结算页面（这个模块是循环的 直到结束）
    # endgame 实验结束 问卷

    #   先是相同组玩实验2和实验1 然后中场休息 等所有人结束之后 再是不同组玩实验2和实验1 然后是结果 最后是调查问卷 结束
    #    #一共9个app
    #         # b1跳到-16
    #         # b2/3F跳到-13
    #         # b2/3S跳到-10
    #         # S_b1跳到-7
    #         # S_b2/3F跳到-4
    #         # S_b2/3S跳到-1

    #         #'one_questionnaire'先不用

    # 分组情况1+基准组——对照组1——对照组2
    # 分组情况2+基准组——对照组1——对照组2
    # 分组情况3+基准组——对照组1——对照组2
    # 分组情况1+基准组——对照组2——对照组1
    # 分组情况2+基准组——对照组2——对照组1
    # 分组情况3+基准组——对照组2——对照组1
    #     介绍页面1删除 2 3 简化
    dict(
        name='bargaining1',
        display_name='bargaining1',
        num_demo_participants=18,
        app_sequence=['start_game', 'bargaining_questionnaire', 'group_rgb', 'testgame', 'group1',
                      'bargaining', 'wait_other', 'instruction_bargaining2_first', 'bargaining2_first', 'wait_other2',
                      'instruction_bargaining3_second',
                      'bargaining3_second', 'half_rest','S_group2', 'S_bargaining', 'S_wait_other', 'S_instruction_bargaining2_first',
                      'S_bargaining2_first', 'S_wait_other2', 'S_instruction_bargaining3_second',
                      'S_bargaining3_second', 'end_game'],
    ),
    dict(
        name='bargaining2',
        display_name='bargaining2',
        num_demo_participants=18,
        app_sequence=['start_game', 'bargaining_questionnaire', 'group_rgb', 'testgame', 'group1',
                      'bargaining', 'wait_other', 'instruction_bargaining3_first', 'bargaining3_first', 'wait_other2',
                      'instruction_bargaining2_second',
                      'bargaining2_second', 'half_rest', 'S_group3', 'S_bargaining', 'S_wait_other',
                      'S_instruction_bargaining3_first',
                      'S_bargaining3_first', 'S_wait_other2', 'S_instruction_bargaining2_second',
                      'S_bargaining2_second', 'end_game'],

    ),
    dict(
        name='bargaining3',
        display_name='bargaining3',
        num_demo_participants=18,
        app_sequence=['start_game', 'bargaining_questionnaire', 'group_rgb', 'testgame', 'group2',
                      'bargaining', 'wait_other', 'instruction_bargaining3_first', 'bargaining3_first', 'wait_other2',
                      'instruction_bargaining2_second',
                      'bargaining2_second', 'half_rest','S_group1', 'S_bargaining', 'S_wait_other', 'S_instruction_bargaining3_first',
                      'S_bargaining3_first', 'S_wait_other2', 'S_instruction_bargaining2_second',
                      'S_bargaining2_second', 'end_game'],

    ),
    dict(
        name='bargaining4',
        display_name='bargaining4',
        num_demo_participants=18,
        app_sequence=['start_game', 'bargaining_questionnaire', 'group_rgb', 'testgame', 'group2',
                      'bargaining', 'wait_other', 'instruction_bargaining2_first', 'bargaining2_first', 'wait_other2',
                      'instruction_bargaining3_second',
                      'bargaining3_second', 'half_rest','S_group3', 'S_bargaining', 'S_wait_other', 'S_instruction_bargaining2_first',
                      'S_bargaining2_first', 'S_wait_other2', 'S_instruction_bargaining3_second',
                      'S_bargaining3_second', 'end_game'],

    ),
    dict(
        name='bargaining5',
        display_name='bargaining5',
        num_demo_participants=18,
        app_sequence=['start_game', 'bargaining_questionnaire', 'group_rgb', 'testgame', 'group3',
                      'bargaining', 'wait_other', 'instruction_bargaining3_first', 'bargaining3_first', 'wait_other2',
                      'instruction_bargaining2_second',
                      'bargaining2_second', 'half_rest','S_group1', 'S_bargaining', 'S_wait_other', 'S_instruction_bargaining3_first',
                      'S_bargaining3_first', 'S_wait_other2', 'S_instruction_bargaining2_second',
                      'S_bargaining2_second', 'end_game'],

    ),
    dict(
        name='bargaining6',
        display_name='bargaining6',
        num_demo_participants=18,
        app_sequence=['start_game', 'bargaining_questionnaire', 'group_rgb', 'testgame', 'group3',
                      'bargaining', 'wait_other', 'instruction_bargaining2_first', 'bargaining2_first', 'wait_other2',
                      'instruction_bargaining3_second',
                      'bargaining3_second', 'half_rest','S_group2', 'S_bargaining', 'S_wait_other', 'S_instruction_bargaining2_first',
                      'S_bargaining2_first', 'S_wait_other2', 'S_instruction_bargaining3_second',
                      'S_bargaining3_second', 'end_game'],
    ),
    dict(
        name='der',
        display_name="der",
        num_demo_participants=3,
        app_sequence=['add_demo'],
    ),
    dict(
        name='restart_system',
        num_demo_participants=6,
        app_sequence=['restart_system']
    ),
    dict(
        name='Test',
        display_name="Test",
        num_demo_participants=6,
        app_sequence=['login', 'one_questionnaire', 'public_goods', 'my_trust', 'questionnaire_investigations']
        # 'one_questionnaire','pre_public_goods', 'public_goods', 'my_trust','pre_public_goods','one_questionnaire',
    ),
    dict(
        name='guess_two_thirds',
        display_name="Guess 2/3 of the Average",
        num_demo_participants=3,
        app_sequence=['guess_two_thirds', 'payment_info'],
    ),
    dict(
        name='survey',
        display_name='survey',
        num_demo_participants=1,
        app_sequence=['survey', 'payment_info'],
    ),
    dict(
        name='bertrand',
        display_name='bertrand',
        num_demo_participants=6,
        app_sequence=['bertrand'],
    ),
    dict(
        name='common_value_auction',
        display_name='common_value_auction',
        num_demo_participants=6,
        app_sequence=['common_value_auction'],
    ),
    dict(
        name='cournot',
        display_name='cournot',
        num_demo_participants=6,
        app_sequence=['cournot'],
    ),
    dict(
        name='dictator',
        display_name='dictator',
        num_demo_participants=6,
        app_sequence=['dictator'],
    ),
    dict(
        name='matching_pennies',
        display_name='matching_pennies',
        num_demo_participants=6,
        app_sequence=['matching_pennies'],
    ),
    dict(
        name='payment_info',
        display_name='payment_info',
        num_demo_participants=6,
        app_sequence=['payment_info'],
    ),
    dict(
        name='prisoner',
        display_name='prisoner',
        num_demo_participants=6,
        app_sequence=['prisoner'],
    ),
    dict(
        name='traveler_dilemma',
        display_name='traveler_dilemma',
        num_demo_participants=6,
        app_sequence=['traveler_dilemma'],
    ),
    dict(
        name='volunteer_dilemma',
        display_name='volunteer_dilemma',
        num_demo_participants=6,
        app_sequence=['volunteer_dilemma'],
    ),

]

# if you set a property in SESSION_CONFIG_DEFAULTS, it will be inherited by all configs
# in SESSION_CONFIGS, except those that explicitly override it.
# the session config can be accessed from methods in your apps as self.session.config,
# e.g. self.session.config['participation_fee']

SESSION_CONFIG_DEFAULTS = dict(
    real_world_currency_per_point=1.00, participation_fee=0.00, doc=""
)

ROOT_URLCONF = 'urls'

ROOMS = [
    dict(
        name='econ101',
        display_name='Econ 101 class',
        participant_label_file='_rooms/econ101.txt',
    ),
    dict(name='live_demo', display_name='Room for live demo (no participant labels)'),
]

PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
BASE_DIR = os.path.dirname(PROJECT_DIR)
# Vue使用的静态文件的导入
STATICFILES_DIRS = [
    os.path.join(PROJECT_DIR, 'static'),
    # os.path.join(BASE_DIR, "dist/static"),# 加上这条
]
#这一行有就会报错 问题不知道…… ※※※※※※※※※※
# STATIC_ROOT = os.path.join(PROJECT_DIR, 'collect_static')
STATIC_URL = '/static/'

# ISO-639 code
# for example: de, fr, ja, ko, zh-hans
LANGUAGE_CODE = 'en'

# e.g. EUR, GBP, CNY, JPY
REAL_WORLD_CURRENCY_CODE = 'USD'
USE_POINTS = True

ROOMS = []

ADMIN_USERNAME = 'admin'
# for security, best to set admin password in an environment variable
ADMIN_PASSWORD = environ.get('OTREE_ADMIN_PASSWORD')

DEMO_PAGE_INTRO_HTML = """ """

SECRET_KEY = 'g^*7ma&hn*a&@d7swv!%#^6qnow4@glu1k#t=pf@pj)(l*d*jt'

# if an app is included in SESSION_CONFIGS, you don't need to list it here
# 如果一个应用程序包含在SESSION_CONFIGS中，你不需要在这里列出它
# 使用静态文件的app要在这里列出来?
INSTALLED_APPS = ['otree']

PARTICIPANT_FIELDS = ['initial_funding', 'total_payoff']
# 全局变量
# 奖池1 奖池2 队伍 成员 第一次对抗分组 第二次对抗分组
SESSION_FIELDS = ['point_pool1', 'point_pool2', 'group', 'r1', 'r2', 'r3', 'r4', 'r5', 'r6', 'b1', 'b2', 'b3', 'b4',
                  'b5', 'b6', 'g1', 'g2', 'g3', 'g4', 'g5', 'g6', 'first_contest', 'second_contest', 'random_numbers'
    , 'A_CalculateGamePoint', 'B_CalculateGamePoint', 'C_CalculateGamePoint']
